package com.songcha.module_login.ui.fragment.user_protocol

import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.songcha.library_base.interfaces.IApiResult
import com.songcha.library_base.mvvm.base.BaseViewModel
import com.songcha.library_business.bean.configuration.SystemConfigurationResultBean
import com.songcha.library_business.bean.configuration._SystemConfigurationDataBean
import com.songcha.library_business.proxy.configuration.SystemConfigurationManager


class UserProtocolViewModel(app: Application):BaseViewModel<UserProtocolRepository>(app) {
    val userProtocol=MutableLiveData<String>()

    fun getUserProtocol(){
        handleApiDataObserver(SystemConfigurationManager.getSystemConfiguration(),object :IApiResult<SystemConfigurationResultBean>{
            override fun onSuccess(bean: SystemConfigurationResultBean) {
                userProtocol.value=bean.userProtocol
            }
        },true)
    }
}